/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufpr.inf.escel.testing.tools.impl;

import br.ufpr.inf.escel.testing.tools.*;
import br.ufpr.inf.escel.brain.model.Individual;
import br.ufpr.inf.escel.testing.model.Cut;

/**
 *
 * @author gustavo
 * @since 4.4
 */
public abstract class Ferramenta {

    /**
     * Roda os comandos para todos os dados de teste de um individuo
     * @param ind
     * @return fitness do individuo
     */
    public abstract double run(Individual ind);
    
    public abstract void setCut(Cut cut);

    public static Ferramenta getTool(String tipo) {
        if (tipo.toLowerCase().contains("poke")) {
            return new Poketool();
        } else if (tipo.toLowerCase().equals("proteum")) {
            return new Proteum();
        } else if (tipo.toLowerCase().equals("jabuti")) {
            return new Jabuti();
        }
        throw new UnsupportedOperationException("Ferramenta inexistente!");
    }
}
